package com.ruoyi.web.controller.Index;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.Ability_IndexAPIInfor;
import com.ruoyi.domain.AbilitylistIndexInfoT;
import com.ruoyi.service.Ability_IndexAPIService;
import com.ruoyi.service.AbilitylistIndexservice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;

import static com.ruoyi.common.core.domain.AjaxResult.success;
import static com.ruoyi.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/index/ability")
public class AbilityIndexController {
    @Autowired
    AbilitylistIndexservice abilitylistIndexservice;
    @Autowired
    Ability_IndexAPIService ability_IndexAPIService;
    BaseController a;
    @GetMapping("/list")
    public AjaxResult getServerAbilityList(){
        List<AbilitylistIndexInfoT> list=abilitylistIndexservice.selectAbilitylistIndexInfoT(new AbilitylistIndexInfoT());
        return success(list);
    }
    @GetMapping("/api")
    public AjaxResult getServerAPIList(@RequestParam("id") Integer id){
        List<Ability_IndexAPIInfor> list=ability_IndexAPIService.selectAbility_IndexAPIInforById(id);
        return success(list);
    }
}
